<?php
	include("../Action/config.php");
	$json = urldecode(file_get_contents("php://input"));
	$arrayJson = json_decode($json,true);

	$child_num = $arrayJson['child_num'];
	$free_time = $arrayJson['free_time'];
	$parent_num = $arrayJson['parent_num'];

	// $child_name = urlencode($child_name);

	$sql = "UPDATE CHILD SET free_time = $free_time WHERE parent_num = 
		$parent_num AND child_num=$child_num";
	$result = mysql_query($sql);
	
	echo $result;
	
	// $sql = "DELETE FROM CHILD WHERE parent_num = '$parent_num' AND child_name='$child_name'";
	// $result = mysql_query($sql);

	// if ($result == '1') {
	// 	echo "success";
	// } else {
	// 	echo $result;	
	// }
?>
